<?php
$url = $_POST['url'];
$pattern = $_POST['pattern'];

$content = file_get_contents($url);
preg_match($pattern, $content, $matches);

$result = '';
for ($i = 1; $i < sizeof($matches); $i++) {
	echo $matches[$i];
	echo "\n";
}
//echo $result;
?>